package com.legal.app.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.legal.common.annotation.Excel;
import com.legal.common.core.domain.BaseEntity;

/**
 * 订单对象 z_order
 * 
 * @author Ale
 * @date 2025-05-30
 */
@TableName("z_order")
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 律师ID */
    @Excel(name = "律师ID")
    private Long lawyerId;

    /** 服务类型(1=电话,2=图文,3=视频) */
    @Excel(name = "服务类型(1=电话,2=图文,3=视频)")
    private Long serviceType;

    /** 订单状态(1=待支付,2=待服务,3=进行中,4=已完成,5=已取消,6=已退款) */
    @Excel(name = "订单状态(1=待支付,2=待服务,3=进行中,4=已完成,5=已取消,6=已退款)")
    private Long status;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private BigDecimal amount;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 服务时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date serviceTime;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date finishTime;

    /** 取消原因 */
    @Excel(name = "取消原因")
    private String cancelReason;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setLawyerId(Long lawyerId) 
    {
        this.lawyerId = lawyerId;
    }

    public Long getLawyerId() 
    {
        return lawyerId;
    }

    public void setServiceType(Long serviceType) 
    {
        this.serviceType = serviceType;
    }

    public Long getServiceType() 
    {
        return serviceType;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    public void setServiceTime(Date serviceTime) 
    {
        this.serviceTime = serviceTime;
    }

    public Date getServiceTime() 
    {
        return serviceTime;
    }

    public void setFinishTime(Date finishTime) 
    {
        this.finishTime = finishTime;
    }

    public Date getFinishTime() 
    {
        return finishTime;
    }

    public void setCancelReason(String cancelReason) 
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason() 
    {
        return cancelReason;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("lawyerId", getLawyerId())
            .append("serviceType", getServiceType())
            .append("status", getStatus())
            .append("amount", getAmount())
            .append("payTime", getPayTime())
            .append("serviceTime", getServiceTime())
            .append("finishTime", getFinishTime())
            .append("cancelReason", getCancelReason())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
